package pattern.observer.rule;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by boot on 8/31/15.
 */
public abstract class WeatherSubject {
    public List<Observer> observers = new ArrayList<Observer>();

    public void attach(Observer observer) {
        observers.add(observer);
    }

    public void detach(Observer observer) {
        observers.remove(observer);
    }

    protected abstract void notifyObservers();
}
